package cn.edu.scau.cmi.liyetian.client;

import java.util.Scanner;

import cn.edu.scau.cmi.liyetian.factory.*;
import cn.edu.scau.cmi.liyetian.factory.domain.*;

public class FactoryClient {
	public static void main(String[] args) {
		System.out.println("请选择肉类，牛肉、猪肉还是鸡肉？");
		Scanner scanner = new Scanner(System.in);
		String meatKind = scanner.next();
		MeatFactory meatFactory = null;
		switch (meatKind) {
		case "beef":
			meatFactory = new BeefFactory();
			break;
		case "pork":
			meatFactory = new PorkFactory();
			break;
		case "chicken":
			meatFactory = new ChickenFactory();
			break;
		default:
			System.out.println("对不起，你的输入无效");

		}
		if (meatFactory != null) {
			Meat meat = meatFactory.getMeat();
			meat.cook();
		}
	}
}
